package com.sc.consumber_feign.service;

import com.sc.consumber_feign.entity.Goods;
import org.springframework.stereotype.Component;

import java.util.ArrayList;
import java.util.List;


@Component
public class RemoteFeignServiceFallBack implements  RemoteFeignService{
    @Override
    public List<Goods> findGoods() {
        List<Goods> list=new ArrayList<>();
        list.add(new Goods(-1,"服务调用无效error") );
        return list;
    }

    @Override
    public Goods findOneGoods(int id) {
        return new Goods(id,"服务调用无效error");
    }

    @Override
    public Goods addGoods(Goods goods) {
        return new Goods(goods.getId(),"服务调用无效error");
        //return null;
    }

    @Override
    public Goods updateGoods(Goods goods) {
        return new Goods(goods.getId(),"服务调用无效error");
        //return null;
    }

    @Override
    public Boolean deleteGoods(int id) {
        return null;
    }
}
